<?php

/*
 * Action
 * 
 * 4$
 * 
 * +1 buy, +2$
 * When you gain this, put it on top of your deck.
 * 
 */

class NomadCamp extends Card implements iAction, iKingdom, iHinterlands {

    public function __construct() {
        parent::__construct("Nomad Camp", 4);
        $this->undoPlay = false;
        $this->undoBuy = true;
    }
    
    public function getDescription() {
        return array(
            "+1 buy",
            "+2$",
            "When you gain this, put it on top of your deck.");
    }

    public function gainThisCard(Game $game, $name = null) {
        $game->setDestinationPile(DrawPile);
        ScreenDisplay::addScreenMessage($game, true, "put ".  nicePrint($this)." on top of your deck", "puts ". ScreenDisplay::$LMSG. " on top of his deck", $name);
        $game->setTempCard($this);
        return true;
    }
        
    public function play(Game $game, $isRealCard) {
        $game->addBuys(1);
        $game->addMoney(new Price(2));
        ScreenDisplay::addScreenMessage($game, true, "get +1 buy and +2$", "gets +1 buy and +2$");
    }

}